/*******************************************************************************
* file  : crypto_test
*******************************************************************************/
#include "common.h"
#include "os_obj.h"
#include "sys_init.h"

void crypto_task(const void *argument);
osThreadDef(crypto_task, osPriorityNormal, 1, 0x4000);

void des_demo(void);
void aes_demo(void);
void base64_demo(void);
void md5_demo(void);
void sha256_demo(void);
void rsa_demo(void);

/*******************************************************************************
* @brief  crypto_test.
* \param[in] none
* \retval: none
*******************************************************************************/
void crypto_task(const void *argument)
{
	osDelay(100);
	
	des_demo();
	aes_demo();
	base64_demo();
	md5_demo();
	sha256_demo();
	rsa_demo();
	
	for(;;)
	{
		osDelay(1000);
	}
}

void crypto_demo_add(void)
{
	os_obj.tid_crypto = osThreadCreate(osThread(crypto_task),NULL);
}
obj_init_order5(crypto_demo_add);
